<?php

namespace Home\Controller;

use Common\Controller\HomeBaseController;

class IndexController extends HomeBaseController {
	function _initialize() {
		parent::_initialize ();
		
		 $this->base_price=C("SITE_FUWU_PRICE");
		 $this->assign ( "nav", "home" );
		
	}
	public function index() {
		
		cookie("jump_self",get_now_url());
		$this->assign ( "seo_title", C ( "SITE_NAME" ) );
		$this->assign ( "seo_keywords", C ( "SITE_KEYWORDS" ) );
		$this->assign ( "seo_description", C ( "SITE_DESCRIPTION" ) );
		$this->display ( ":index" );
	}
	public function auth()
	{
		$message=I("get.message");

		$this->assign("message", $message);
		$this->display(":auth");

	}


	public  function  liuyan(){

		if (IS_POST) {

			$_POST[date]=date("Y-m-d");
			if (D("Liuyan")->create($_POST)) {
				if (D("Liuyan")->add()!==false) {
					$this->success("留言成功,等待客服回答。！");
				} else {
					$this->error("留言失败！");
				}
			} else {
				$this->error(D("Liuyan")->getError());
			}
		}




	}

 

}